dict1 = {'name': 'Tom', 'age': 20, 'gender': '男'}

for item in dict1.items():
    print(item)

"""
    ('name', 'Tom')
    ('age', 20)
    ('gender', '男')
"""

# xx.items()：返回可迭代对象，内部都是元组，元组有2个数据
# 元组数据1是字典的key，元组数据2是字典的value

for key, value in dict1.items():
    print(f'{key} = {value}')

"""
    name = Tom
    age = 20
    gender = 男
"""